/*
 * @Author: yangzonglong
 * @Date: 2023-05-26 09:40:49
 * @version: v1.0.0
 * @Descripttion: 
 * @LastEditors: 871387321@qq.com 871387321@qq.com
 * @LastEditTime: 2023-11-06 17:09:23
 * @Auditor: 
 */
import { CanvasItemProps } from './../../interface';
import { } from './../../';

export interface ActionProps {
  formName?: string;
  breadCrumbName?: string;
  jumpNewPage?: boolean;
  showRowSelection?: boolean;
  addUrl?: string;
  hideAddBtn?: boolean;
  onChange?: (value: string | boolean, key: string) => void;
}

export interface ActionBtnProps {
  type?: string;
  text?: string;
  scriptText?: string;
  displayScript?: string;
  url?: string;
}

export interface DataListRef {
  getData(): any[];
}

export interface ModalFormRef {
  show?(data: object, name: string, url?: string, disabed?: boolean): void;
  hide?(): void;
}

export interface TabsOptionProps {
  lable: string;
  labelEn: string;
  value: string;
  id: string;
  url: string;
  query: string;
  formName: string;
  breadCrumbName?: string;
  showActionColumns: boolean;
  jumpNewPage: boolean;
  showRowSelection: boolean;
  deleteUrl: string;
  updateUrl: string;
  addUrl: string;
  columns: any[];
  actionBtnGroup: ActionBtnProps[];
  hideAddBtn?: boolean;
  showCount?: boolean;
  fuzzyField?: any[];
}
export interface DataListProps extends CanvasItemProps {
  jumpNewPage?: boolean | undefined;
  treeStructure?: boolean | undefined;
  isExpand?: boolean | undefined;
  checkStrictly?: boolean | undefined;
  initialValue?: any[];
  showRowSelection?: boolean | undefined;
  treeId?: string;
  treeParentId?: string;
  url?: string;
  _id?: string;
  showSearch?: boolean;
  showTabs?: boolean;
  bacthUploadData?: boolean;
  query?: string | any;
  fuzzyField?: object[];
  btnGroup?: Array<{ text: string; textEn?: string; tabIds?: string[]; scriptText?: string; background?: string; color?: string }>;
  actionBtnGroup: ActionBtnProps[];
  tabsOption?: TabsOptionProps[];
  columns?: any[];
  formName?: string;
  breadCrumbName?: string;
  showActionColumns?: boolean;
  deleteUrl?: string;
  updateUrl?: string;
  addUrl?: string;
  name?: string; // 数据存储
  business?: any;
  disabled?: boolean;
  fontSize?: number;
  fontWeight?: number;
  backgroundColor?: string;
  color?: string;
  customizeStyleFlag?: boolean;
  autoLoad?: boolean; // 主动获取数据
  autoHeight?: boolean; // 
  hideAddBtn?: boolean;
  onValuesChange?: Function;
  enviromentConfig?: any;
  rowCustomizationScript?: string;
  clickScript?: string
}